<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Wyp
 */

namespace App\Modules\Live\Validators;


use Flower\Core\Repository\Contracts\ValidatorInterface;
use Flower\Core\Repository\Validator\LaravelValidator;

class LiveValidator extends LaravelValidator
{
    protected $rules = [
        ValidatorInterface::RULE_CREATE => [
            'name' => 'filled|between:2,20',
            'user_id' => 'required|numeric',
            'picture' => 'filled',
            'store_id' => 'required|numeric',
        ],
        ValidatorInterface::RULE_UPDATE => [
        ]
    ];
    protected $messages = [
        'name.required' => '直播间名称不能为空',
        'name.between' => '直播间名称应在2-20个字符之间',

        'user_id.required' => '主播id不能为空',
        'user_id.numeric' => '主播id格式错误',

        'picture.filled' => '请填写房间封面',
        'store_id.required' => '店铺id不能为空',
        'store_id.numeric' => '店铺id格式错误',
    ];
}